<!doctype html>
<html>
<head>
    <#include '../../public/head.ftl'>
    <link href="../../../static/blog/css/info.css" rel="stylesheet">
    <title>人民币大写在线转换工具</title>
    <meta name="keywords" content="人民币大写在线转换工具 在线将阿拉伯数字转换成中文大写工具 人民币大写转换工具"/>
    <meta name="description" content="人民币大写在线转换工具"/>
    <link href="/static/tool/css/tool.css" rel="stylesheet">
</head>
<style>
    ol, ul, li{list-style:none}
    img{border:0;margin: 0 auto;}
    *:focus{outline:none}
    a{color:#252525;text-decoration:none}
    a:hover{color:#BA2636;text-decoration:underline}

    .a{ margin:0 auto; width:100%; overflow:hidden}
    .red{ color:#F00}

    #menu a{padding:0 10px;color:#FFF}

    #content{margin:0 auto;width:782px;padding:20px 0;padding-top: 0; overflow:hidden}
    h2{ text-align:left; font-size:20px;text-indent:10px; line-height:40px; font-weight:bold; border:1px solid #CCC}
    ul.daxielist{border:1px solid #CCC;border-top:0;padding:20px 0;padding-bottom:0;width:780px;overflow:hidden;text-align:center }
    ul.daxielist li{ float:left; width:19.8%; font-size:18px;padding-bottom:10px;}

    .Instructions,.Instructionst{border:1px solid #CCC;padding:10px;border-top:0;text-align:left;font-size:16px;line-height:24px;background: #F6F6F6;}
    .Instructionst{ padding-top:0}
    ul.zhuanhuan{ background:#F6F6F6;width:780px;border:1px solid #CCC;border-bottom:0;border-top:0;overflow:hidden;padding:10px 0}
    ul.zhuanhuan li{padding:10px;text-align:left;width:760px;overflow:hidden}
    ul.zhuanhuan li h3{ float:left;line-height:40px;height:40px;width:210px;text-align:right;font-size:18px}
    ul.zhuanhuan li .li{ float:left; height:40px; padding-left:5px; text-align:left; padding-top:3px}
    ul.zhuanhuan li .li input.shuru ,ul.zhuanhuan li .li input.xianshi{float:left;width:280px;background:#FFF;border:1px solid #333;height:40px;line-height:40px;padding:0 10px;text-align:left;font-size:20px}
    ul.zhuanhuan li .li input.xianshi{width:420px; font-family:"SimHei";font-size:18px}
    ul.zhuanhuan li .li .bto-box{float:left;padding-left:15px}

    ul.zhuanhuan li .li .bottom{float:left;background:url(../../../static/blog/casesensitivity/bottoms.gif) no-repeat 0 -40px;border:0;width:124px;height:40px;overflow:hidden;text-indent:-9999px}
    ul.zhuanhuan li .li .bottom:hover{cursor:pointer;background-position:0 0}

    p{ height:20px;}
</style>
<body>
<#include '../../public/header.ftl'>
<div style="height: 80px"></div>

<article>
    <main>
        <div class="lz-width-1200 lz-margin-auto lz-padding-top-30 lz-bg-white">
            <ol class="breadcrumb">
                <li><a href="/tool/index.html">工具箱</a></li>
                <li class="active">随机密码生成器</li>
            </ol>
        </div>
        <div class="infosbox">
            <div class="newsview">
                <div class="news_con">
                    <div id="content">
                        <h2>1、人民币大写转换器（在线将阿拉伯数字转换成中文大写、人民币大写转换工具）</h2>
                        <form action="" method="get">
                            <ul class="a zhuanhuan">
                                <li>
                                    <h3>输入小写数字金额：</h3>
                                    <div class="li">
                                        <input name="Digits" id="Digits" class="shuru" size="31">
                                        <div class="bto-box"><input id="Convert" onclick="Result.value = convertCurrency(Digits.value);" class="bottom" type="button" value="输入待转换数字金额" name="Convert"></div>
                                    </div>
                                </li>
                                <li>
                                    <h3>显示中文大写金额：</h3>
                                    <div class="li"><input id="Result" size="40" name="Result" class="xianshi"></div>
                                </li>
                            </ul>
                        </form>
                        <div class="Instructionst">
                            <div class="a"><strong>数字转换大写工具使用说明：</strong><br>将阿拉伯数字复制粘贴或输入到“输入小写数字金额”中，比如（123456），然后单击“转换为大写金额”按钮。就会在“显示中文大写金额”框中显示自动转换完成的中文大写内容。最后复制转换完成的内容到想到的地方粘贴即可。<br>
                                <strong>人民币符号</strong>:¥；<strong>美元符号</strong>：$；<strong>欧元符号</strong>：€；<strong>英镑符号</strong>：￡（货币符号可直接鼠标选中后复制使用）。</div></div>
                        <h2>2、阿拉伯数字对应大写表 - 数字转大写金额 (以下<span class="red">红色字</span>可选中复制)</h2>
                        <ul class="daxielist">
                            <li><img src="../../../static/blog/casesensitivity/0.jpg" alt="0 大写 零" title="0 的大写为 零"><br>0 = <b class="red">零</b></li>
                            <li><img src="../../../static/blog/casesensitivity/1.jpg" alt="1 大写 壹" title="1 的大写为 壹"><br>1 = <b class="red">壹</b></li>
                            <li><img src="../../../static/blog/casesensitivity/2.jpg" alt="2 大写 贰" title="2 的大写为 贰"><br>2 = <b class="red">贰</b></li>
                            <li><img src="../../../static/blog/casesensitivity/3.jpg" alt="3 大写 叁" title="3 的大写为 叁"><br>3 = <b class="red">叁</b></li>
                            <li><img src="../../../static/blog/casesensitivity/4.jpg" alt="4 大写 肆" title="4 的大写为 肆"><br>4 = <b class="red">肆</b></li>

                            <li><img src="../../../static/blog/casesensitivity/5.jpg" alt="5 大写 伍" title="5 的大写为 伍"><br>5 = <b class="red">伍</b></li>
                            <li><img src="../../../static/blog/casesensitivity/6.jpg" alt="6 大写 陆" title="6 的大写为 陆"><br>6 = <b class="red">陆</b></li>
                            <li><img src="../../../static/blog/casesensitivity/7.jpg" alt="7 大写 柒" title="7 的大写为 柒"><br>7 = <b class="red">柒</b></li>
                            <li><img src="../../../static/blog/casesensitivity/8.jpg" alt="8 大写 捌" title="8 的大写为 捌"><br>8 = <b class="red">捌</b></li>
                            <li><img src="../../../static/blog/casesensitivity/9.jpg" alt="9 大写 玖" title="9 的大写为 玖"><br>9 = <b class="red">玖</b></li>
                        </ul>
                        <div class="Instructions"><strong>使用说明：</strong><br>中文大写金额数字前应标明“人民币”字样，大写金额数字应紧接“人民币”字样填写，不得留有空白。<br>阿拉伯数字小写金额数字中有“0”时，中文大写应按照汉语语言规律、金额数字构成和防止涂改的要求进行书写。<br>例如：￥206000.75应写成 人民币贰拾万陆仟元零柒角伍分，或写成 人民币贰拾万零陆仟元柒角伍分。</div>
                        <h2>3、金额单位(位数)对应表</h2>
                        <ul class="daxielist">
                            <li><img src="../../../static/blog/casesensitivity/yi.jpg" alt="亿" title="亿"><br>亿 = <b class="red">亿</b></li>
                            <li><img src="../../../static/blog/casesensitivity/wan.jpg" alt="万" title="万"><br>万 = <b class="red">万</b></li>
                            <li><img src="../../../static/blog/casesensitivity/qian.jpg" alt="仟" title="仟"><br>千 = <b class="red">仟</b></li>
                            <li><img src="../../../static/blog/casesensitivity/bai.jpg" alt="佰" title="佰"><br>百 = <b class="red">佰</b></li>
                            <li><img src="../../../static/blog/casesensitivity/10.jpg" alt="拾" title="拾"><br>十 = <b class="red">拾</b></li>
                            <li><img src="../../../static/blog/casesensitivity/yuan.jpg" alt="元" title="元"><br>元 = <b class="red">元(圆)</b></li>
                            <li><img src="../../../static/blog/casesensitivity/jiao.jpg" alt="角" title="角"><br>角 = <b class="red">角</b></li>
                            <li><img src="../../../static/blog/casesensitivity/fen.jpg" alt="分" title="分"><br>分 = <b class="red">分</b></li>
                            <li><img src="../../../static/blog/casesensitivity/zheng1.jpg" alt="正" title="正"><br>正 = <b class="red">正</b></li>
                            <li><img src="../../../static/blog/casesensitivity/zheng2.jpg" alt="整" title="整"><br>整 = <b class="red">整</b></li>
                        </ul>
                        <div class="Instructions"><strong>使用说明：</strong><br>中文大写金额数字到“元”为止的，在“元”之后、应写“整”(或“正”)字；在“角”之后，可以不写“整”(或“正”)字；大写金额数字有“分”的，“分”后面不写“整”(或“正”)字。</div>
                    </div>
                </div>
            </div>



        </div>
    </main>
</article>
<#include '../../public/footer.ftl'>
<script language="jscript">
    function convertCurrency(currencyDigits) {
// Constants:
        var MAXIMUM_NUMBER = 99999999999.99;
        // Predefine the radix characters and currency symbols for output:
        var CN_ZERO = "零";
        var CN_ONE = "壹";
        var CN_TWO = "贰";
        var CN_THREE = "叁";
        var CN_FOUR = "肆";
        var CN_FIVE = "伍";
        var CN_SIX = "陆";
        var CN_SEVEN = "柒";
        var CN_EIGHT = "捌";
        var CN_NINE = "玖";
        var CN_TEN = "拾";
        var CN_HUNDRED = "佰";
        var CN_THOUSAND = "仟";
        var CN_TEN_THOUSAND = "万";
        var CN_HUNDRED_MILLION = "亿";
        var CN_SYMBOL = "";
        var CN_DOLLAR = "元";
        var CN_TEN_CENT = "角";
        var CN_CENT = "分";
        var CN_INTEGER = "整";

// Variables:
        var integral;    // Represent integral part of digit number.
        var decimal;    // Represent decimal part of digit number.
        var outputCharacters;    // The output result.
        var parts;
        var digits, radices, bigRadices, decimals;
        var zeroCount;
        var i, p, d,ds;
        var quotient, modulus;

// Validate input string:
        currencyDigits = currencyDigits.toString();
        if (currencyDigits == "") {
            alert("不能为空 请输入数字金额!如：123.23");
            return "";
        }
        if (currencyDigits.match(/[^,.\d]/) != null) {
            alert("输入字符串中的字符无效!");
            return "";
        }
        if ((currencyDigits).match(/^((\d{1,3}(,\d{3})*(.((\d{3},)*\d{1,3}))?)|(\d+(.\d+)?))$/) == null) {
            alert("请输入正确的数字金额!");
            return "";
        }

// Normalize the format of input digits:
        currencyDigits = currencyDigits.replace(/,/g, "");    // Remove comma delimiters.
        currencyDigits = currencyDigits.replace(/^0+/, "");    // Trim zeros at the beginning.
        // Assert the number is not greater than the maximum number.
        if (Number(currencyDigits) > MAXIMUM_NUMBER) {
            alert("Too large a number to convert!");
            return "";
        }

// Process the coversion from currency digits to characters:
        // Separate integral and decimal parts before processing coversion:
        parts = currencyDigits.split(".");
        if (parts.length > 1) {
            integral = parts[0];
            decimal = parts[1];
            // Cut down redundant decimal digits that are after the second.
            decimal = decimal.substr(0, 2);
        }
        else {
            integral = parts[0];
            decimal = "";
        }
        // Prepare the characters corresponding to the digits:
        digits = new Array(CN_ZERO, CN_ONE, CN_TWO, CN_THREE, CN_FOUR, CN_FIVE, CN_SIX, CN_SEVEN, CN_EIGHT, CN_NINE);
        radices = new Array("", CN_TEN, CN_HUNDRED, CN_THOUSAND);
        bigRadices = new Array("", CN_TEN_THOUSAND, CN_HUNDRED_MILLION);
        decimals = new Array(CN_TEN_CENT, CN_CENT);
        // Start processing:
        outputCharacters = "";
        // Process integral part if it is larger than 0:
        if (Number(integral) > 0) {
            zeroCount = 0;
            for (i = 0; i < integral.length; i++) {
                p = integral.length - i - 1;
                d = integral.substr(i, 1);
                quotient = p / 4;
                modulus = p % 4;
                if (d == "0") {
                    zeroCount++;
                }
                else {
                    if (zeroCount > 0)
                    {
                        outputCharacters += digits[0];
                    }
                    zeroCount = 0;
                    outputCharacters += digits[Number(d)] + radices[modulus];
                }
                if (modulus == 0 && zeroCount < 4) {
                    outputCharacters += bigRadices[quotient];
                }
            }
            outputCharacters += CN_DOLLAR;
        }
        // Process decimal part if there is:
        if (decimal != "") {
            for (i = 0; i < decimal.length; i++) {
                d = decimal.substr(i, 1);
                ds=decimal.substr(-1, 1);
                if(d==0){
                    if(ds==0){
                        outputCharacters += "";
                    }
                    else{
                        outputCharacters += digits[Number(d)];
                    }
                }
                else{

                    outputCharacters += digits[Number(d)] + decimals[i];

                }
            }
        }
        // Confirm and return the final output string:
        if (outputCharacters == "") {
            outputCharacters = CN_ZERO + CN_DOLLAR;
        }
        if (decimal == "") {
            outputCharacters += CN_INTEGER;
        }
        outputCharacters = CN_SYMBOL + outputCharacters;
        return outputCharacters;
    }
</script>
</body>
</html>
